package cn.school.attendance.dormitory.dao;

import cn.school.attendance.dormitory.entity.AttendanceRules;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * @author: lx
 * @date: 2023/9/5 9:46
 * @description:
 */
@Mapper
@Component
public interface AttendanceRulesDao extends BaseMapper<AttendanceRules> {

    int findRulesPageListCount(@Param("query")AttendanceRules query);

    List<AttendanceRules> findRulesPageList(@Param("query") AttendanceRules query,
                                            @Param("startNum") int startNum,
                                            @Param("pageSize") int pageSize);

    List<AttendanceRules> getAllAttendanceRules();

    List<AttendanceRules> getAllAttendanceRulesDetailInfo();

    /**
     * 根据考勤规则id查询考勤信息
     * @param id
     * @return
     */
    AttendanceRules getAttendanceRulesDetailInfoById(@Param("id")Long id);
}
